package com.woniuxy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 佘赛飞
 * @create 2021 -11 -18 9:58 PM
 */
@Controller
@RequestMapping("/arry")
public class ArrayController {
    @RequestMapping("/arryfindByIdUser")
    public ModelAndView arryfindByIdUser(int[] ids) {
        List<Integer> list = new ArrayList<>();
        for (int id : ids) {
            list.add(id);
        }
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("ids", "传入的数组是：" + list);
        modelAndView.setViewName("arryview");
        return modelAndView;
    }
}
